package com.example.broadcastreceiver.orderly;

import androidx.appcompat.app.AppCompatActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.broadcastreceiver.Constants;
import com.example.broadcastreceiver.R;

public class SendOrderlyBroadcastActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_orderly_broadcast);
        //TODO：发送一个有序广播

    }

    public void onClick(View view) {
        Intent intent = new Intent();
        intent.setAction(Constants.ACTION_ORDER_BROADCAST_TEST);
        Bundle bundle=new Bundle();
        bundle.putCharSequence("content","我是被发送的广播内容...");

        sendOrderedBroadcast(intent, null,null,null, Activity.RESULT_OK,null,bundle);

    }
}